﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BestBuy.DAL;

namespace BestBuy.UserControl
{
    public partial class ProductInfoPreview : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }        
        public int setCategoryID
        {
            set
            {
                lbCategory.Text = cDangSanPham.GetCategoryString(value);
                HiddenCategory.Value = value.ToString();
            }
        }
        public string setProductDetail
        {
            set
            {
                lbProductDetail.Text = value;
            }
        }
        public string setProductName
        {
            set
            {
                lbProductName.Text = value;
            }
        }
        public string setModel
        {
            set
            {
                lbModel.Text = value;
            }
        }
        public string setKeyWord
        {
            set
            {
                lbKeyword.Text = value;
            }
        }
        public string setDescription
        {
            set
            {
                lbDescription.Text = value;
            }
        }
        public string setUrlPhoto
        {
            set
            {
                lbPhoto.Text = value;
            }
        }
        public string setUrlBrochoure
        {
            set
            {
                lbBrochoure.Text = value;
            }
        }
        public string setSupplyingAbility
        {
             set
            {
                lbSupplyAbility.Text = value;
            }
        }
        public string setDeliverTime
        {
            set
            {
                lbDeliverytime.Text = value;
            }
        }
        public string setPlaceOfOrigin
        {
            set
            {
                lbPlaceofOrgin.Text = value;
            }
        }
        public string setMinimumOrder
        {
            set
            {
                lbMinimumOrder.Text = value;
            }
        }
        public int[] setPayment
        {
            set
            {
                for (int i = 0; i < value.Count();i++ )
                {
                    if (value[i]>0)
                    {
                        PaymentCheckBoxList.Items[i].Selected = true;
                    }
                }
            }
        }
    }
}